package com.abcd.godating.service;

import java.io.InputStream;
import java.io.OutputStream;
import java.util.Collection;

import com.abcd.godating.domain.BasicProfile;
import com.abcd.godating.domain.MoreProfile;
import com.abcd.godating.domain.Profile;

public interface ProfileService {
	
	/**
	 * add the picture for the user
	 * 
	 * @param userId user id
	 * @param in the input stream of the picture
	 * @param newName the name of the uploaded file
	 */
	public void addPicture(long userId, InputStream in, String newPictureName);
	
	/**
	 * remove the picture from the user
	 * 
	 * @param userId user id
	 * @param fileName the removed picture name
	 */
	public void removePicture(long userId, String pictureName);
	
	/**
	 * get the picture of the user
	 *  
	 * @param userId user id
	 * @param pictureName the picture name which you want to get
	 * @return
	 */
	public OutputStream getPicture(long userId, String pictureName);
	
	/**
	 * get the picture list of the user
	 * 
	 * @param userId
	 * @return
	 */
	public Collection<OutputStream> getPricures(long userId);

	/**
	 * Save the user basic Profile
	 * 
	 * @param userId the user id
	 * @param basicProfile the user basic profile information
	 */
	public void saveBasicProfile(long userId, BasicProfile basicProfile);
	
	/**
	 * get the user basic profile
	 * 
	 * @param userId the user id
	 * @return
	 */
	public BasicProfile getBasicProfile(long userId);

	/**
	 * save the user more profile information
	 * 
	 * @param userId the user id
	 * @param moreProfile more profile information of the user
	 */
	public void saveMoreProfile(long userId, MoreProfile moreProfile);
	
	/**
	 * get the user more profile information
	 * 
	 * @param userId the user id
	 * @return
	 */
	public MoreProfile getMoreProfile(long userId);
	
	/**
	 * save the user nickname
	 * 
	 * @param userId the user id
	 * @param nickName the user nickName
	 */
	public void saveNickName(long userId, String nickName);
	

	/**
	 * get the user nickname
	 * 
	 * @param userId the user id
	 * @return
	 */
	public String getNickName(long userId);
	
	/**
	 * save the user profile
	 * 
	 * @param userId the user id
	 * @param profile the user profile information
	 */
	public void saveProfile(long userId, Profile profile);

	/**
	 * get the user profile information
	 * 
	 * @param userId the user id
	 * @return
	 */
	public Profile getProfile(long userId);

	/**
	 * get the users basic profile information
	 * 
	 * @param userIds
	 * @return
	 */
	public Collection<BasicProfile> getBasicProfiles(Collection<Long> userIds);
	
	/**
	 * ?? TODO??
	 * 
	 * @param id
	 * @return
	 */
	public OutputStream getSmallPicture(long id);

}